//
//  FindHealthCell.swift
//  JTYP
//
//  Created by Groot on 2017/12/13.
//  Copyright © 2017年 inspur. All rights reserved.
//

class FindHealthCell: UICollectionViewCell{
    
    static let CellIdentifier = String(describing: FindHealthCell.self)
    
    @IBOutlet weak var iconView: UIImageView!
    @IBOutlet weak var titleLab: UILabel!
    @IBOutlet weak var tipLab: UILabel!
    @IBOutlet weak var stationLab: UILabel!
    @IBOutlet weak var watchedLab: UILabel!

    override func awakeFromNib() {
        
        tipLab.layer.cornerRadius = 4
        tipLab.layer.borderWidth = 1
        tipLab.layer.borderColor = DefaultColor.green.cgColor
        tipLab.textColor = DefaultColor.green
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
    }
    
    func setData(obj: Notice) {
        iconView.yy_setImage(with: URL.init(string: "\(obj.pictures?.first?.url ?? "")"), placeholder: UIImage.init(named: "pyq_creat_fbgg"))
        titleLab.text = obj.title
        tipLab.text = obj.subtypename ?? "悦动健康"
        stationLab.text = obj.publishdeptname ?? "济铁悦跑"
        watchedLab.text = "\(obj.pv ?? 0)"
    }
}

